<?php

$url= 'http://u.dgkangfei.com/api/detail.jsp';
$url = 'http://117.29.164.98:8008/et/ebusiness/ticketInfo.do';
//$data=array(        'productNo'=>'7873011',
//                    'custId'=>'291009',
//                    'apikey'=>'E885A0E22E64EB8D38CC7338407E997B',
//);
$user = 'EBUSINESS_PFT';
$pwd = 'JOYTIME@PFT';

$result = curl_post($url,$data,$user,$pwd);
var_dump($result);
function curl_post($url, $data,$user='',$pass='') {

    $post_data= http_build_query($data);
    $post_data=  urldecode($post_data);

    $ch = curl_init();
    echo $url;
    curl_setopt($ch, CURLOPT_URL, $url);
//    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_USERPWD, "{$user}:{$pass}");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $res = curl_exec($ch);
    curl_close($ch);
    return $res;
}